tools: disable linker --as-needed option.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 1 Feb 2011 19:23:31 +0000 (19:23 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 1 Feb 2011 19:23:31 +0000 (19:23 +0000)
The Xen build system is not currently compatible with the --as-needed
linker option. The proper fix for this is turning out to be rather
invasive to the build system so simply disable for now with the
intention of revisiting for the 4.2 release.

The --no-as-needed option is available at least since binutils 2.15
(released in May 2004) and hence I think can be unconditionally relied
on.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reported-by: Nathan March <nathan@gt.net>
Tested-by: Nathan March <nathan@gt.net>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/Rules.mk

index 75948a3cddf623e68c459a7c022e7500b962ce8b..f7dda356b5c5c82bad110c6f6bf0da5c545f824c 100644 (file)
@@ -55,6 +55,9 @@ CFLAGS  += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
 LDFLAGS += $(shell getconf LFS_LDFLAGS)
 endif
 
+# Xen tools build is currently incompatible with ld --as-needed
+LDFLAGS += -Wl,--no-as-needed
+
 # 32-bit x86 does not perform well with -ve segment accesses on Xen.
 CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
 CFLAGS += $(CFLAGS-y)